package com.dingding.common.core.base.dto;

import java.io.Serializable;

/**
 * 
 * @ClassName: BaseResponse
 * @Description: 服务间查询类接口数据传输响应基类
 * @author CHEHAUNBO
 * @date 2016年4月23日 下午4:18:33
 * 
 */
public class DubboInvokResponseDTO<T> implements Serializable {

	private static final long serialVersionUID = 1L;

	private int code; // 错误码

	private String errorMessage; // 错误消息

	private T responseData; // 响应的数据

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	public T getResponseData() {
		return responseData;
	}

	public void setResponseData(T responseData) {
		this.responseData = responseData;
	}

	@Override
	public String toString() {
		return "DubboInvokResponseDTO [code=" + code + ", errorMessage=" + errorMessage + ", responseData="
				+ responseData + "]";
	}

	public boolean getStatus() {

		if (code == 200 ) {
			return true;
		}else{
			return false;
		}
	}

}
